package day06;

import java.util.Arrays;

//数组的演示
public class ArrayDemos {
    public static void main(String[] args) {
    //数组的复制
        int[] a= {10,20,40,50,60,70};
//        int[] b = new int[6];
//        System.arraycopy(a,1,b,2,3);
//        for (int i = 0; i < b.length;i++){
//            System.out.println(b[i]);
//        }
       int[] ar = Arrays.copyOf(a,4);
       for (int i = 0;i < ar.length;i++){
           System.out.println(ar[i]);
       }
        System.out.println(a);

    }
}
